#ifndef __GLT_H
#define __GLT_H

/* GLT_LAYER is defined in types.h */
#include <types.h>

/*****************************************/
/*     Graphic Layer Table Structure     */
/*****************************************/
typedef struct graphic_layer_table {
        u32 img_src_addr;               /* graphic layer table word 0 */
        u32 width:      10,             /* graphic layer table word 1 */
            height:     10,
            angle:      9,
            transparent:1,
            reserved0:  1,
            end_layer:  1;
        u32 img_x:      10,							/* graphic layer table word 2 */
        	  img_y:      10,
        	  scale:      4,
            reserved1:  4,
            direction:  2,
            draw:       2;             
        u32 center_x:   11,							/* graphic layer table word 3 */
        	  center_y:   11,
        	  slope:      10;             
} GLT;

#define GLT_START_INDEX  -1

inline void glt_reset_index(void);
inline s8 glt_get_current_index(void);
inline void glt_index_inc(void);
inline void glt_start_index_reset(s8 reset);
u32 glt_read(int, GLT *);
u32 glt_write(int, GLT *);
inline void glt_lock();
inline void glt_unlock();

#endif
